<?php
namespace app\shop\model;

use think\Model;
use app\admin\model\Attachment;

/**
 * 商品模型
 * @package app\admin\model
 */
class Artwork extends Model
{
    protected $name = 'shop_artwork';

    protected $autoWriteTimestamp = true;

    public function getimgpath()
    {
    	return $this->hasOne(Attachment::class, 'id', 'photos');
    }

    public function getartist()
    {
    	return $this->hasOne(Artist::class, 'id', 'artist_id');
    }

    public function getgroup()
    {
        return $this->hasOne(ArtworkGroup::class, 'id', 'group_id');
    }

    
}